package java101;

public class FibQuo {

	public static void main(String[] args) {

		
		for (int i = 0, fib[] = new int[30]; i< fib.length; i++){
			fib[i] = (i<2) ? i : fib[i-1] + fib [i-2];
		
			
			if (i>2){
				double q = fib[i] / fib[i - 1];
				String f = String.format("%d + %d = %d, q = %.3f", fib[i-1], fib[i-2], fib[i], q);
				System.out.println(f); 
			}
			else {
				System.out.println("0 + 1 = 1, q = 0\n1 + 1 = 2, q = .5");
			}
		
	}
	}
}
